<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1 , user-scalable=no">
    <title>图片分享社区后台</title>
 <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/bootstrap.css" />
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/bootstrap-maizi.css" />
</head>
<body>
<!--导航-->
<nav class="navbar navbar-default">
    <div class="container">
        <!--小屏幕导航按钮和logo-->
        <div class="navbar-header">
            <button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="head.action" class="navbar-brand">图片分享社区后台</a>
        </div>
        <!--小屏幕导航按钮和logo-->
        <!--导航-->
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li class="active"><a href="head.action"><span class="glyphicon glyphicon-home"></span>&nbsp;&nbsp;后台首页</a></li>
                <li ><a href="usermanger.action"><span class="glyphicon glyphicon-user"></span>&nbsp;&nbsp;用户管理</a></li>
                <li><a href="contentmanger.action"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;内容管理</a></li>
                <li><a href="labelmanger.action"><span class="glyphicon glyphicon-tags"></span>&nbsp;&nbsp;标签管理</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                       <s:property value="#session.USER_NAME"/>
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" aria-labelledby="dLabel">
                        <li><a href="<%=basePath%>"><span class="glyphicon glyphicon-screenshot"></span>&nbsp;&nbsp;前台首页</a></li>
                        
                        <li><a href="personsetting.action?id=<s:property value="#session.USER_ID"/>"><span class="glyphicon glyphicon-cog"></span>&nbsp;&nbsp;个人设置</a></li>
      
                    </ul>
                </li>
                <li><a href="logout.action"><span class="glyphicon glyphicon-off"></span>&nbsp;&nbsp;退出</a></li>
            </ul>
        </div>
        <!--导航-->

    </div>
</nav>
<!--导航-->

<!--警告框-->
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="alert alert-success alert-dismissible fade in" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4>欢迎你进入,  <s:property value="#session.USER_NAME"/></h4>
                <p>你上次登录时间为20<s:property value="#session.LOGIN_TIME"></s:property></p>
                <p style="color:red;">如果不是你登录，请尽快修改密码</p>
                <p>               
                    <button type="button" class="btn btn-default"  data-dismiss="alert">OK</button>
                </p>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">网站数据统计</div>
                <div class="panel-body">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>统计项目</th>
                                <th>今日</th>
                                <th>昨日</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                 <th scope="row">注册用户</th>
                                 <td>2</td>
                                 <td>4</td>
                            </tr>
                            <tr>
                                <th scope="row">登录用户</th>
                                <td>4</td>
                                <td>5</td>
                            </tr>
                            <tr>
                                <th scope="row">今日发帖</th>
                                <td>4</td>
                                <td>6</td>
                            </tr>
                           
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">网站热帖</div>
                
                <s:iterator value="sharelist" id="share" >
                                                 
                                                             
                    <ul class="list-group">
                        <li class="list-group-item">
                            <a href="watchcontent.action?id=<s:property value='#share.shareid'/>"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp; <s:property value="#share.title" />
                            <small class="pull-right">2<s:property value="#share.sharetime" /></small></a>
                        </li>
                         </s:iterator>                
                    </ul>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">今日访客统计</div>
                <div class="panel-body">
                    <canvas id="canvas" class="col-md-12"></canvas>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="panel panel-default">
                <div class="panel-heading">服务器状态</div>
                <div class="panel-body">
                    <p>内存使用率：40%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%"></div>
                    </div>
                    <p>数据库使用率：20%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-info progress-bar-striped" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"></div>
                    </div>
                    <p>磁盘使用率：60%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"></div>
                    </div>
                    <p>CPU使用率：80%</p>
                    <div class="progress">
                        <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">团队留言板</div>
                <div class="panel-body">
                    <div class="col-md-7">
                        <s:iterator value="leavelist" id="leave">
                      
                        <div class="media well">
                            
                            <div class="media-body">
                                <h4 class="media-heading">发布者：<s:property value='#leave.username'/></h4>
                                留言内容：<s:property value='#leave.content'/>
                            </div>
                        </div>
                        </s:iterator>
                    </div>
                    <div class="col-md-5">
                        <form action="insertleave.action?id=<s:property value='#session.USER_ID'/>" method="post">
                            <div class="form-group">
                                <label for="text1">输入留言内容</label>
                                <textarea class="form-control" id="content" rows="5" cols="10" name="leave.content" placeholder="请输入留言内容"></textarea>
                                <button type="submit" class="btn btn-default mar_t15">留言</button>
                            </div>
                        </form>
                        <div class="panel panel-default">
                            <div class="panel-heading">团队联系手册</div>
                            <div class="panel-body">
                                <ul class="list-group">
                                    <li class="list-group-item">罗展鑫：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13134848615</li>
                                    <li class="list-group-item">王华州：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13456127694</li>
                                    <li class="list-group-item">邓重友：<span class="glyphicon glyphicon-phone"></span>&nbsp;&nbsp;13457815482</li>
                                
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



<!--footer-->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <p>
                    Copyright&nbsp;©&nbsp;2012-2015&nbsp;&nbsp;www.sharephoto.com&nbsp;&nbsp;粤ICP备13014270号-4
                </p>
            </div>
        </div>
    </div>
</footer>
<!--footer-->
<script src="${pageContext.request.contextPath}/JS/jquery-1.12.3.min.js"></script>
<script src="${pageContext.request.contextPath}/JS/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/JS/Chart.js"></script>
<script src="${pageContext.request.contextPath}/JS/script.js"></script>

</body>


</html>